package utils;

import java.io.Serializable;

import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.util.convert.IConverter;
import org.joda.time.LocalDate;

public class LocalDateTextField extends TextField<LocalDate> implements Serializable {

	private static final long serialVersionUID = 1L;

	public LocalDateTextField(String id, Object modelObject,String propertyExpression) {
		super(id, new PropertyModel<LocalDate>(modelObject, propertyExpression));
	}
	
	@Override
	public <C> IConverter<C> getConverter(Class<C> type) {
		return (IConverter<C>) new LocalDateConverter();
	}
	
	
	
}
